package com.earthchen.demo.enums;


/**
 * 异常枚举常量
 *
 * @author earthchen
 * @date 2018/9/6
 **/
public enum ExceptionEnum {


    APPID_USER_NOT_FOUND(50001, "该appid的用户不存在"),
    PASSWORD_ERROR(50002, "密码错误，请重新输入"),

    USERID_NOT_EXISTS(50001, "该USERID的用户不存在"),

    USERID_ROLEID_ALREADY_EXISTS(50003, "该用户已有该角色"),

    DELETE_ROLE_RESOURCE_ERROR(50004, "删除角色对应资源失败"),

    SAVE_ROLE_ERROR(50005, "添加角色失败"),


    DELETE_ROLE_ERROR(50006, "删除角色失败"),

    SAVE_MENUS_ERROR(50007, "保存菜单失败"),

    UPDATE_MENUS_ERROR(50008, "更新菜单失败"),

    DELETE_RESOURCE_ERROR(50009, "删除资源错误"),

    SAVE_API_ERROR(50010,"保存api失败"),

    UPDATE_API_ERROR(50011,"更新api失败")

    ;


    private Integer code;

    private String message;

    ExceptionEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
